package com.lleice.common.enums;

/**
 * 异常枚举
 * @author lilizihao
 *
 */
public enum ExceptionEnum {
	//成功返回
	SUCCESS(0, "执行成功"),
	//逻辑错误返回
	ALL_FAIL(-1,"系统繁忙"),
	//见名知意
	ERROR_FIVE_TIMES(-100000,"输入错误次数过多,请5分钟后再试"),
	//见名知意
	USER_DONT_EXIST(-100001,"用户不存在"),
	//见名知意
	USER_DONT_BLOCK(-100002,"用户被禁用"),
	//见名知意
	ACCOUNT_OR_PASSWORD_ERROR(-100003,"账号或者密码错误"),
	//见名知意
	QXDL(-100004,"请先登录"),
	//见名知意
	FFTOKEN(-100005,"非法token"),
	//见名知意
	TOKENGUOQI(-100006,"登录信息过期,请重新登录"),
	//见名知意
	TOKEN_FAIL(-100007,"token校验错误"),
	//见名知意
	VERIFY_ERROR(-100008,"验证码错误"),
	//见名知意
	VERIFY_GUOQI(-100009,"验证码过期"),
	//见名知意
	NOT_ENOUGTH_PERMISSION(-200000,"没有权限,请先配置权限"),
	//见名知意
	NOT_PERMISSION(-200001,"权限不足"),
	//见名知意
	ORG_CODE_IS_EXIST(-300000,"机构编码已存在"),
	//见名知意
	RESOURCES_CODE_IS_EXIST(-300001,"权限编码已存在"),
	//见名知意
	TOP_ERROR(-300002,"已在最顶部,无法再上移"),
	//见名知意
	UNDER_ERROR(-300003,"已在最底部,无法再下移"),
	//见名知意
	TYPE_ERROR(-300004,"移动类型错误"),
	//见名知意
	MENU_IS_EXIST(-300005,"菜单编码已存在"),
	//见名知意
	PASSWORD_IS_NULL(-300006,"密码不能为空"),
	//见名知意
	ACCOUNT_IS_EXIST(-300007,"账号已存在"),
	//见名知意
	DEP_USER_IS_EXIST(-300008,"该用户已在该机构下"),
	//见名知意
	AUTHORIZATIONROLE_ERROR(-300009,"该角色不属于该用户的机构"),
	//见名知意
	OLD_PASSWORD_ERROR(-300010,"旧密码错误"),
	//见名知意
	REPEAT_VALUE(-300011,"id和parentid不能相同"),
	//见名知意
	REDISSON_ERROR(-300012,"获取锁对象失败");
	
	/**
	 * 返回码
	 */
	private int code;
	/**
	 * 返回错误信息
	 */
    private String msg;

    ExceptionEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
